using System;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using InfoJetSoft.Service.Entity;

namespace InfoJetSoft.Service.Util
{
	/// <summary>
	/// Summary description for ExtIpAppFunction.
	/// </summary>
    public class ExtIpAppFunction : IExtensionFunctions
	{

		private Form form = null;

		public ExtIpAppFunction( Form frm )
		{
			this.form = frm;
        }

        //CID 0755 //2011.01.14 //Begin
        #region IExtensionFunction Members

        public string Prefix
        {
            get { return this.form.Manifest.NsResolver.GetPrefix(this.NamespaceURI); }
        }

        public string NamespaceURI
        {
            get { return JetConstant.URI_IPAPP; }
        }

        public IXsltContextFunction ResolveFunction(string prefix, string name, XPathResultType[] argTypes)
        {
            throw new InfoJetException("Unimplemented Function.", prefix + ":" + name);
        }

        public object InvokeFunction(string prefix, string name, XsltContext xsltContext, object[] args, XPathNavigator docContext)
        {
            throw new InfoJetException("Unimplemented Function.", prefix + ":" + name);
        }

        #endregion
        //CID 0755 //2011.01.14 //End

		public long GetMajorVersion()
		{
			return this.form.Manifest.ProductVersion.code1;
		}
    }
}
